package com.ldq.imooc.basics.socket;

import java.net.InetAddress;
import java.net.UnknownHostException;

/**
 * @Author : 李道泉
 * @Description :
 * @Date : 2018/4/21 18:42
 * @Modified by :
 */
public class NetTest01 {

    public static void main(String[] args) throws UnknownHostException {

        InetAddress address = InetAddress.getLocalHost();
        System.out.println("计算机名："+address.getHostName());
        System.out.println("计算机名："+address.getAddress());
        System.out.println("IPd地址："+address.getHostAddress());
    }
}
